from django.contrib import admin

# Register your models here.
from users import models


@admin.register(models.User)
class UserAdmin(admin.ModelAdmin):
    list_display = ['username', 'last_name', 'mobile', 'email', 'is_superuser']  # 要显示的字段


@admin.register(models.Addr)
class AddrAdmin(admin.ModelAdmin):
    list_display = ['user', 'phone', 'name', 'province', 'city', 'county', 'address', 'is_default']


@admin.register(models.Area)
class AreaAdmin(admin.ModelAdmin):
    list_display = ['pid', 'name', 'lever']


@admin.register(models.City)
class AreaAdmin(admin.ModelAdmin):
    list_display = ['id', 'parentid', 'name', 'shortname','leveltype',]


@admin.register(models.VerifCode)
class UserAdmin(admin.ModelAdmin):
    list_display = ['mobile', 'code', 'create_time']
